import requests

url = 'https://weixin.sogou.com/weixin'

# 请求头
headers = {
    'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Mobile Safari/537.36',
}

# url返回的参数
data = {
    'type': '2',
    'query': '足球'
}

# 添加参数和请求头
# r = requests.get(url=url, headers=headers)
r = requests.get(url=url, params=data, headers=headers)

# 将r进行转码为  utf-8
r.encoding = 'utf-8'
print(r.url)
print('--------------------------')
# print(r.content)
print(r.text)